﻿using System;

namespace MovieBrowser.Event
{
    public class DebugTextEventArgs : EventArgs
    {
        public string Text { get; set; }
        public string Title { get; set; }
        public object Data { get; set; }

        public DebugTextEventArgs(Exception exception)
        {
            Text = exception.Message;
            Data = exception.StackTrace;
        }

        public DebugTextEventArgs(string text)
        {
            Text = text;
        }

        public override string ToString()
        {
            return Text + "\r\n" + (Data != null ? Data + "\r\n" : "");
        }
    }
}